Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@highlight-ui/utils-commons
Advanced tools
A collection of helpers, global constants, shared types used by UI-components in Personio
@highlight-ui/utils-commons
yarn add @highlight-ui/utils-commons
import utils from '@highlight-ui/utils-commons';
Name | Description |
---|---|
ICON_MAP | A map for associating validation states with icons |
THEME_COLOR_TOKEN_MAP | A map for associating themes with color tokens |
Name | Description |
---|---|
FontFamily | Valid FontAwesome family variants |
Locale | Used for internationalization |
Size | Allowed size variants |
Theme | Allowed themes |
ColorToken | Allowed color tokens |
Direction | Used for positioning elements |
ComponentMetadata | Used for specifying required data-attributes for e2e tests |
ParsedMetadata | Same as ComponentMetadata but every attribute is prefixed with data-* |
PropsWithMetadata | Utility type for adding metadata to a component's props |
OutlineVariant | Allowed outlines on input elements |
ValidationStatus | Used for specifying validations status for a message or a file |
Takes an object and converts all of its properties to valid HTML data attributes.
import utils from '@highlight-ui/utils-commons';
const metadata = {
firstAttribute: '1',
secondAttribute: '2',
};
const parsedMetadata = utils.parseMetadata(metadata);
console.log(parsedMetadata);
/*
Output:
{
'data-first-attribute': '1',
'data-second-attribute': '2',
}
*/
Receives an array of callbacks and returns a function that accepts an event argument that will be passed to every callback in the array.
import utils from '@highlight-ui/utils-commons';
const MyComponent = () => {
const handleClick = utils.forkHandlers([
() => {
console.log('first handler');
},
() => {
console.log('second handler');
},
(event) => {
event.preventDefault();
console.log('third handler');
},
]);
return <div onClick={handleClick}>Click Me</div>;
};
FAQs
A collection of helpers, global constants, shared types used by UI-components in Personio
The npm package @highlight-ui/utils-commons receives a total of 2,003 weekly downloads. As such, @highlight-ui/utils-commons popularity was classified as popular.
We found that @highlight-ui/utils-commons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.